package com.rxyb.toolize.http;

import com.rxyb.toolize.JsonUtils;
import net.sf.json.JSON;
import net.sf.json.JSONObject;
import net.sf.json.JSONString;
import net.sf.json.util.JSONUtils;
import org.apache.http.HttpException;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * @author YJH
 * @version 1.0
 * @description
 * @date 2020/5/27  17:18
 */
public class Test {

    public static void main(String[] args) throws IOException, HttpException {
        Map<String, Object> m = new HashMap<>();
        m.put("version", "1.0");
        m.put("transNo", "fd9b4ac9-5bab-443c-bcf5-e674356581e1");
        m.put("reqTime", "20200526172023");
        m.put("customerMessage", "A000155445474547547854785547");
        m.put("customerIdNo", "610581198111210322");
//        m.put("customerImgUrl", "data:image/jpeg;ba");
        m.put("customerName", "薛娜");
        m.put("serviceId", "11c20b11-60b6-4630-8aaa-6266355b9b87");
        m.put("callbackUrl", "https://shrilebiz-s.ywsoftware.cn:9443/api/FacerecogniseForRxyb/VideoEndCall");

        HttpResponse httpResponse = HttpProtocolHandler.getInstance().doPostWithStream("https://srtool.rongxinhui.com/srtool-srv/checkTools", JsonUtils.objectToJson(m), null);
        System.out.println("xxx----" + httpResponse.getStringResult());
    }
}
